var t = require;
var e = module;
var o = exports;
var i, n = this && this.__extends || (i = function(t, e) {
    return (i = Object.setPrototypeOf || {
        __proto__: []
    }
    instanceof Array &&
    function(t, e) {
        t.__proto__ = e
    } ||
    function(t, e) {
        for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o])
    })(t, e)
},
function(t, e) {
    function o() {
        this.constructor = t
    }
    i(t, e),
    t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
}),
a = this && this.__decorate ||
function(t, e, o, i) {
    var n, a = arguments.length,
    r = a < 3 ? e: null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
    else for (var s = t.length - 1; s >= 0; s--)(n = t[s]) && (r = (a < 3 ? n(r) : a > 3 ? n(e, o, r) : n(e, o)) || r);
    return a > 3 && r && Object.defineProperty(e, o, r),
    r
};
Object.defineProperty(o, "__esModule", {
    value: !0
});
var r = cc._decorator,
s = r.ccclass,
l = r.property,
c = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.node_left = null,
        e.node_right = null,
        e._gameView = null,
        e
    }
    return n(e, t),
    e.prototype.onLoad = function() {
        this.node.active = !1,
        this.node_left.active = !1,
        this.node_right.active = !1
    },
    e.prototype.init = function(t) {
        this._gameView = t,
        this.node.active = !1,
        this.node_left.active = !1,
        this.node_right.active = !1
    },
    e.prototype.showAnim = function(t, e, o) {
        var i = this;
        this._gameView = t,
        this.node.active = !1,
        this.node_left.active = !1,
        this.node_right.active = !1,
        this.scheduleOnce(function() {
            i.playshowAnim(e, o)
        },
        .6)
    },
    e.prototype.playshowAnim = function(t) {
        var e = this;
        this.node_left.active = t,
        this.node_right.active = !t,
        this.node.active = !0,
        this.scheduleOnce(function() {
            e.node.active = !1
        },
        1.75)
    },
    e.prototype.playMovetoTop = function(t, e, o) {
        var i, n = this;
        i = e ? this.node_left.getChildByName("star") : this.node_right.getChildByName("star"),
        cc.tween(i).to(.75, {
            position: cc.v3(t.x, t.y, 0),
            scale: .2
        }).call(function() {
            n._gameView.onShowWinStar(e, o),
            n.node.destroy()
        }).start()
    },
    a([l(cc.Node)], e.prototype, "node_left", void 0),
    a([l(cc.Node)], e.prototype, "node_right", void 0),
    a([s], e)
} (cc.Component);
o.default = c